package com.realtyManage.springboot.Dao;


import com.realtyManage.springboot.Model.Do.Dictionaries;
import com.realtyManage.springboot.Model.Do.HouseFans;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 楼盘粉丝
 *
 * @author 杭州素色网络科技有限公司
 * @since 2019-09-24
 */

@Repository
public interface HouseFansRepository extends JpaRepository<HouseFans, Integer>, JpaSpecificationExecutor<HouseFans> {


    @Query(value="SELECT* FROM ((SELECT count(1) fans FROM house_fans) a, " +
            "(SELECT count(1) thisFans FROM house_fans WHERE info_time LIKE %?1%) b) ",nativeQuery=true)
    String findFans(String thisTime);
}
